<extend file='resource/view/Module'>
    <block name="content">
        <!-- TAB NAVIGATION -->
        <ul class="nav nav-tabs" role="tablist">
            <li class="active"><h3>模块列表</h3></li>
        </ul>
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="8%">编号</th>
                <th  width="15%">模块名称</th>
                <th>模块图标</th>
                <th>作者</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach from="$field" value="$d">
                <tr>
                    <td>{{$d['id']}}</td>
                    <td>{{$d['module_name']}}</td>
                    <td>
                        <img src="{{$d['module_thumb']}}" style="height: 50px" alt="">
                    </td>
                    <td>{{$d['module_author']}}</td>
                    <td>
                        <div class="btn-group btn-group-sm">
                            <a href="javascript:;" onclick="del('{{$d['module_name']}}')" class="btn btn-danger">卸载</a>
                        </div>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        {{$field->links()}}
        <script>
            function del(module_name) {
                util.confirm('确定删除吗', function (res) {
                    location.href = "{{u('del')}}&module_name=" + module_name;
                })
            }
        </script>
    </block>
